package com.shixi.shixitraining.shixitraining.base;

import android.content.Context;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;

import com.shixi.shixitraining.shixitraining.util.LoadingUtil;

/**
 * Created by shenyan on 2018/7/5.
 */

public class BaseActivity extends AppCompatActivity {


    private LoadingUtil loadingUtil;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

    }

    @Override
    protected void onStart() {
        super.onStart();
        loadingUtil = new LoadingUtil();
    }

    @Override
    public void setContentView(int layoutResID) {
        super.setContentView(layoutResID);
    }

    /**
     * 显示进度条
     * @param context
     */
    public void showLoadingDailog(Context context){
        loadingUtil.showLoadingDialog(context);
    }

    /**
     * 隐藏进度条
     */
    public  void dismissLoadingDialog(){
        loadingUtil.dismissLoadingDialog();
    }


}
